new enum GtkSortType.
authorStefan Jeske <stefan@gtk.org>
Wed, 5 Aug 1998 20:02:32 +0000 (20:02 +0000)
committerStefan Jeske <stefan@src.gnome.org>
Wed, 5 Aug 1998 20:02:32 +0000 (20:02 +0000)
commitc8df83a2fee148d871b36ca5ac742dc566c64612
tree37dcd8897135303e9db3ca6e858f53c6b095455b
parente48d4e715947f7b976e14dcdb8bb431c60c485cc
new enum GtkSortType.

Wed Aug  5 21:12:37 1998  Stefan Jeske  <stefan@gtk.org>

* gtk/gtkenums.h: new enum GtkSortType.

* gtk/gtkclist.h:
* gtk/gtkclist.c:
Added sorting capabilities to GtkCList. New APIs :
gtk_clist_set_compare_func, gtk_clist_set_sort_column,
gtk_clist_set_sort_type, gtk_clist_sort, gtk_clist_set_auto_sort.
New internal functions : default_compare, merge, mergesort.

(gtk_clist_append): This is just a wrapper for gtk_clist_insert now.

(gtk_clist_insert): Modified to handle gtk_clist_append and the
auto sort flag. Changed the return value from void to gint to
return the row number where the element was actually inserted.

(gtk_clist_swap_rows): Return immediately if auto sort flag is set.

* gtk/gtkctree.h:
* gtk/gtkctree.c:
Removed the auto_sort flag, replaced ctree->node_compare with
clist->compare all over the place, modified default_compare to
match clist's needs. Removed APIĀ“s : gtk_ctree_set_auto_sort,
gtk_ctree_set_compare_func. Removed GtkCTreeCompareFunc typedef.

* gtk/testgtk.c: Modified clist/ctree samples to demonstrate
sorting. The lists can be sorted by a column by clicking the
corresponding title button.
14 files changed:
ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkclist.c
gtk/gtkclist.h
gtk/gtkctree.c
gtk/gtkctree.h
gtk/gtkenums.h
gtk/testgtk.c
tests/testgtk.c